home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / prog_bas / easynet.zip / DEMO.ZIP / WORKFLOW.FRM < prev    next >
Text File  |  1996-01-01  |  13KB  |  586 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00FFFFFF&
  5.    Caption         =   "Example 1: WorkFlow"
  6.    ClientHeight    =   4110
  7.    ClientLeft      =   1170
  8.    ClientTop       =   1545
  9.    ClientWidth     =   5685
  10.    FillColor       =   &H0080FFFF&
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   1
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   4515
  22.    Left            =   1110
  23.    LinkTopic       =   "Form1"
  24.    MDIChild        =   -1  'True
  25.    ScaleHeight     =   4110
  26.    ScaleWidth      =   5685
  27.    Tag             =   "1"
  28.    Top             =   1200
  29.    Width           =   5805
  30.    Begin VB.PictureBox Picture1 
  31.       Appearance      =   0  'Flat
  32.       BackColor       =   &H80000005&
  33.       ForeColor       =   &H80000008&
  34.       Height          =   585
  35.       Index           =   0
  36.       Left            =   3570
  37.       Picture         =   "WORKFLOW.frx":0000
  38.       ScaleHeight     =   555
  39.       ScaleWidth      =   555
  40.       TabIndex        =   3
  41.       Top             =   3000
  42.       Visible         =   0   'False
  43.       Width           =   585
  44.    End
  45.    Begin VB.PictureBox Picture1 
  46.       Appearance      =   0  'Flat
  47.       BackColor       =   &H80000005&
  48.       ForeColor       =   &H80000008&
  49.       Height          =   585
  50.       Index           =   2
  51.       Left            =   4800
  52.       Picture         =   "WORKFLOW.frx":030A
  53.       ScaleHeight     =   555
  54.       ScaleWidth      =   585
  55.       TabIndex        =   2
  56.       Top             =   3000
  57.       Visible         =   0   'False
  58.       Width           =   615
  59.    End
  60.    Begin VB.PictureBox Picture1 
  61.       Appearance      =   0  'Flat
  62.       BackColor       =   &H80000005&
  63.       ForeColor       =   &H80000008&
  64.       Height          =   585
  65.       Index           =   1
  66.       Left            =   4170
  67.       Picture         =   "WORKFLOW.frx":0614
  68.       ScaleHeight     =   555
  69.       ScaleWidth      =   585
  70.       TabIndex        =   1
  71.       Top             =   3000
  72.       Visible         =   0   'False
  73.       Width           =   615
  74.    End
  75.    Begin VBX.EasyNet Net1 
  76.       Alignment       =   7  'Center - MIDDLE
  77.       AutoScroll      =   -1  'True
  78.       BackColor       =   &H00E0FFFF&
  79.       CanMultiLink    =   -1  'True
  80.       DrawColor       =   &H00FF0000&
  81.       DrawWidth       =   1
  82.       FillColor       =   &H0080FFFF&
  83.       FontBold        =   0   'False
  84.       FontItalic      =   0   'False
  85.       FontName        =   "MS Sans Serif"
  86.       FontSize        =   8.25
  87.       FontStrikethru  =   0   'False
  88.       FontUnderline   =   0   'False
  89.       ForeColor       =   &H00C00000&
  90.       Height          =   2475
  91.       Hiding          =   0   'False
  92.       ImageFile       =   ""
  93.       Left            =   240
  94.       License         =   "WORKFLOW.frx":091E
  95.       MultiSel        =   -1  'True
  96.       ScrollBars      =   3  'Both
  97.       TabIndex        =   0
  98.       Top             =   210
  99.       Version         =   183
  100.       Width           =   5295
  101.       xGrid           =   15
  102.       yGrid           =   15
  103.    End
  104. End
  105. Attribute VB_Name = "Form1"
  106. Attribute VB_Creatable = False
  107. Attribute VB_Exposed = False
  108. Option Explicit
  109.  
  110. Dim n%, interflag%
  111.  
  112.  
  113.  
  114. Private Sub banner1()
  115.   Dim Node() As Long
  116.  
  117.   interflag = False
  118.   ReDim Node(1 To 19)
  119.  
  120.   Net1.EditAction = 0
  121.   Net1.DrawColor = 32768
  122.   Net1.FillColor = RGB(255, 255, 192)
  123.   Net1.X1 = 1050
  124.   Net1.X2 = 2355
  125.   Net1.Y1 = 60
  126.   Net1.Y2 = 1020
  127.   Net1.Text = "Order Entry"
  128.   Net1.Picture = Picture1(2).Picture
  129.   Node(1) = Net1.Item
  130.  
  131.   Net1.EditAction = 0
  132.   Net1.DrawColor = 32768
  133.   Net1.FillColor = 16777215
  134.   Net1.X1 = 1470
  135.   Net1.X2 = 1920
  136.   Net1.Y1 = 1570
  137.   Net1.Y2 = 2020
  138.   Net1.Text = "and"
  139.   Node(2) = Net1.Item
  140.  
  141.   Net1.EditAction = 0
  142.   Net1.DrawColor = 32768
  143.   Net1.FillColor = 16777215
  144.   Net1.X1 = 1425
  145.   Net1.X2 = 1845
  146.   Net1.Y1 = 4815
  147.   Net1.Y2 = 5295
  148.   Node(3) = Net1.Item
  149.  
  150.   Net1.EditAction = 0
  151.   Net1.Shape = 2
  152.   Net1.DrawColor = 32768
  153.   Net1.FillColor = 8454143
  154.   Net1.X1 = 245
  155.   Net1.X2 = 1360
  156.   Net1.Y1 = 3285
  157.   Net1.Y2 = 3810
  158.   Net1.Text = "Inventory Check"
  159.   Node(4) = Net1.Item
  160.  
  161.   Net1.EditAction = 0
  162.   Net1.Shape = 2
  163.   Net1.DrawColor = 32768
  164.   Net1.FillColor = 8454143
  165.   Net1.X1 = 2070
  166.   Net1.X2 = 3345
  167.   Net1.Y1 = 2700
  168.   Net1.Y2 = 3165
  169.   Net1.Text = "Compile Reference"
  170.   Node(5) = Net1.Item
  171.  
  172.   Net1.EditAction = 0
  173.   Net1.Shape = 2
  174.   Net1.DrawColor = 32768
  175.   Net1.FillColor = 8454143
  176.   Net1.X1 = 2070
  177.   Net1.X2 = 3345
  178.   Net1.Y1 = 3960
  179.   Net1.Y2 = 4395
  180.   Net1.Text = "Evaluate Reference"
  181.   Node(6) = Net1.Item
  182.  
  183.   Net1.EditAction = 0
  184.   Net1.Shape = 3
  185.   Net1.DrawColor = 32768
  186.   Net1.FillColor = 12632256
  187.   Net1.X1 = 2460
  188.   Net1.X2 = 2940
  189.   Net1.Y1 = 4800
  190.   Net1.Y2 = 5280
  191.   Net1.Text = "or"
  192.   Node(7) = Net1.Item
  193.  
  194.   Net1.EditAction = 0
  195.   Net1.Shape = 3
  196.   Net1.DrawColor = 32768
  197.   Net1.FillColor = 12632256
  198.   Net1.X1 = 1380
  199.   Net1.X2 = 1860
  200.   Net1.Y1 = 6390
  201.   Net1.Y2 = 6870
  202.   Net1.Text = "or"
  203.   Node(8) = Net1.Item
  204.  
  205.   Net1.EditAction = 0
  206.   Net1.Shape = 2
  207.   Net1.DrawColor = 32768
  208.   Net1.FillColor = 8454143
  209.   Net1.X1 = 1050
  210.   Net1.X2 = 2200
  211.   Net1.Y1 = 5620
  212.   Net1.Y2 = 6150
  213.   Net1.Text = "Order Evaluation"
  214.   Node(9) = Net1.Item
  215.  
  216.   Net1.EditAction = 0
  217.   Net1.Shape = 2
  218.   Net1.DrawColor = 32768
  219.   Net1.FillColor = 8454143
  220.   Net1.X1 = 30
  221.   Net1.X2 = 1395
  222.   Net1.Y1 = 7275
  223.   Net1.Y2 = 8190
  224.   Net1.Text = "Letter of regret"
  225.   Net1.Picture = Picture1(0).Picture
  226.   Node(10) = Net1.Item
  227.  
  228.   Net1.EditAction = 0
  229.   Net1.Shape = 2
  230.   Net1.DrawColor = 32768
  231.   Net1.FillColor = 8454143
  232.   Net1.X1 = 2010
  233.   Net1.X2 = 3195
  234.   Net1.Y1 = 7425
  235.   Net1.Y2 = 7815
  236.   Net1.Text = "Billing"
  237.   Node(11) = Net1.Item
  238.  
  239.   Net1.EditAction = 0
  240.   Net1.Shape = 2
  241.   Net1.DrawColor = 32768
  242.   Net1.FillColor = 8454143
  243.   Net1.X1 = 2025
  244.   Net1.X2 = 3195
  245.   Net1.Y1 = 8310
  246.   Net1.Y2 = 8685
  247.   Net1.Text = "Shipping"
  248.   Node(12) = Net1.Item
  249.  
  250.   Net1.EditAction = 0
  251.   Net1.DrawColor = 32768
  252.   Net1.FillColor = RGB(255, 255, 192)
  253.   Net1.X1 = 1080
  254.   Net1.X2 = 2190
  255.   Net1.Y1 = 9505
  256.   Net1.Y2 = 10420
  257.   Net1.Text = "Archive"
  258.   Net1.Picture = Picture1(1).Picture
  259.   Node(13) = Net1.Item
  260.  
  261.   Net1.Item = 0
  262.   Net1.Shape = 2
  263.   Net1.DrawColor = RGB(0, 0, 255)
  264.  
  265.   Net1.EditAction = 0
  266.   Net1.Transparent = -1
  267.   Net1.Type = 2
  268.   Net1.FillColor = 15269887
  269.   Net1.X1 = 45
  270.   Net1.X2 = 1260
  271.   Net1.Y1 = 1135
  272.   Net1.Y2 = 1775
  273.   Net1.Text = "Jane" & cr & lf & "INVENTORY MANAGER"
  274.   Node(15) = Net1.Item
  275.  
  276.   Net1.EditAction = 0
  277.   Net1.Transparent = -1
  278.   Net1.Type = 2
  279.   Net1.FillColor = 15269887
  280.   Net1.X1 = 2915
  281.   Net1.X2 = 3930
  282.   Net1.Y1 = 1110
  283.   Net1.Y2 = 1635
  284.   Net1.Text = "Paul" & cr & lf & "SECRETARY"
  285.   Node(16) = Net1.Item
  286.  
  287.   Net1.EditAction = 0
  288.   Net1.Transparent = -1
  289.   Net1.Type = 2
  290.   Net1.FillColor = 15269887
  291.   Net1.X1 = 3000
  292.   Net1.X2 = 4000
  293.   Net1.Y1 = 5640
  294.   Net1.Y2 = 6120
  295.   Net1.Text = "Lydia" & cr & lf & "SECRETARY"
  296.   Node(17) = Net1.Item
  297.  
  298.   Net1.EditAction = 0
  299.   Net1.DrawStyle = 2
  300.   Net1.Transparent = -1
  301.   Net1.Type = 2
  302.   Net1.FillColor = 15269887
  303.   Net1.X1 = 3410
  304.   Net1.X2 = 4010
  305.   Net1.Y1 = 7770
  306.   Net1.Y2 = 8310
  307.   Net1.Text = "Bill"
  308.   Node(18) = Net1.Item
  309.  
  310.   Net1.EditAction = 0
  311.   Net1.Transparent = -1
  312.   Net1.Type = 2
  313.   Net1.FillColor = 15269887
  314.   Net1.X1 = 105
  315.   Net1.X2 = 945
  316.   Net1.Y1 = 9030
  317.   Net1.Y2 = 9630
  318.   Net1.Text = "Jack" & cr & lf & "ARCHIVER"
  319.   Node(19) = Net1.Item
  320.  
  321.   Net1.Org = Node(1)
  322.   Net1.Dst = Node(2)
  323.   Net1.EditAction = 1
  324.   Net1.DrawColor = 32768
  325.   Net1.DrawStyle = 0
  326.  
  327.   Net1.Org = Node(2)
  328.   Net1.Dst = Node(4)
  329.   Net1.EditAction = 1
  330.   Net1.DrawColor = 32768
  331.   Net1.DrawStyle = 0
  332.   Net1.PointCount = 1
  333.   Net1.PointX(0) = 795
  334.   Net1.PointY(0) = 2130
  335.  
  336.   Net1.Org = Node(5)
  337.   Net1.Dst = Node(6)
  338.   Net1.EditAction = 1
  339.   Net1.DrawColor = 32768
  340.   Net1.DrawStyle = 0
  341.  
  342.   Net1.Org = Node(4)
  343.   Net1.Dst = Node(3)
  344.   Net1.EditAction = 1
  345.   Net1.DrawColor = 32768
  346.   Net1.DrawStyle = 0
  347.   Net1.PointCount = 1
  348.   Net1.PointX(0) = 795
  349.   Net1.PointY(0) = 5040
  350.  
  351.   Net1.Org = Node(6)
  352.   Net1.Dst = Node(7)
  353.   Net1.EditAction = 1
  354.   Net1.DrawColor = 32768
  355.   Net1.DrawStyle = 0
  356.  
  357.   Net1.Org = Node(7)
  358.   Net1.Dst = Node(3)
  359.   Net1.EditAction = 1
  360.   Net1.DrawColor = 32768
  361.   Net1.DrawStyle = 0
  362.   Net1.Text = "Yes"
  363.  
  364.   Net1.Org = Node(3)
  365.   Net1.Dst = Node(9)
  366.   Net1.EditAction = 1
  367.   Net1.DrawColor = 32768
  368.   Net1.DrawStyle = 0
  369.  
  370.   Net1.Org = Node(9)
  371.   Net1.Dst = Node(8)
  372.   Net1.EditAction = 1
  373.   Net1.DrawColor = 32768
  374.   Net1.DrawStyle = 0
  375.  
  376.   Net1.Org = Node(8)
  377.   Net1.Dst = Node(10)
  378.   Net1.EditAction = 1
  379.   Net1.DrawColor = 32768
  380.   Net1.DrawStyle = 0
  381.   Net1.PointCount = 1
  382.   Net1.PointX(0) = 705
  383.   Net1.PointY(0) = 6795
  384.   Net1.Text = "Reject"
  385.  
  386.   Net1.Org = Node(8)
  387.   Net1.Dst = Node(11)
  388.   Net1.EditAction = 1
  389.   Net1.DrawColor = 32768
  390.   Net1.DrawStyle = 0
  391.   Net1.PointCount = 1
  392.   Net1.PointX(0) = 2595
  393.   Net1.PointY(0) = 6795
  394.   Net1.Text = "Accept"
  395.  
  396.   Net1.Org = Node(11)
  397.   Net1.Dst = Node(12)
  398.   Net1.EditAction = 1
  399.   Net1.DrawColor = RGB(0, 0, 255)
  400.   Net1.DrawStyle = 0
  401.  
  402.   Net1.Org = Node(12)
  403.   Net1.Dst = Node(13)
  404.   Net1.EditAction = 1
  405.   Net1.DrawColor = 32768
  406.   Net1.DrawStyle = 0
  407.  
  408.   Net1.Org = Node(10)
  409.   Net1.Dst = Node(13)
  410.   Net1.EditAction = 1
  411.   Net1.DrawColor = 32768
  412.   Net1.DrawStyle = 0
  413.  
  414.   Net1.Org = Node(2)
  415.   Net1.Dst = Node(5)
  416.   Net1.EditAction = 1
  417.   Net1.DrawColor = 32768
  418.   Net1.DrawStyle = 0
  419.   Net1.PointCount = 1
  420.   Net1.PointX(0) = 2700
  421.   Net1.PointY(0) = 2115
  422.  
  423.   Net1.Org = Node(7)
  424.   Net1.Dst = Node(5)
  425.   Net1.EditAction = 1
  426.   Net1.DrawColor = 32768
  427.   Net1.DrawStyle = 0
  428.   Net1.PointCount = 2
  429.   Net1.PointX(0) = 4020
  430.   Net1.PointY(0) = 5040
  431.   Net1.PointX(1) = 4020
  432.   Net1.PointY(1) = 2925
  433.   Net1.Text = "No"
  434.  
  435.   ' default properties for the end
  436.   Net1.Item = 0
  437.   Net1.DrawStyle = 0
  438.   Net1.DrawWidth = 1
  439.   Net1.Shape = 2
  440.   Net1.Transparent = True
  441.   interflag = True
  442.   ' Now continue
  443.  
  444.   Net1.Org = Node(15)
  445.   Net1.Dst = Node(1)
  446.   Net1.EditAction = 1
  447.  
  448.   Net1.Org = Node(16)
  449.   Net1.Dst = Node(5)
  450.   Net1.EditAction = 1
  451.  
  452.   Net1.Org = Node(16)
  453.   Net1.Dst = Node(6)
  454.   Net1.EditAction = 1
  455.  
  456.   Net1.Org = Node(15)
  457.   Net1.Dst = Node(4)
  458.   Net1.EditAction = 1
  459.   Net1.PointCount = 1
  460.   Net1.PointX(0) = 450
  461.   Net1.PointY(0) = 2460
  462.  
  463.   Net1.Org = Node(17)
  464.   Net1.Dst = Node(9)
  465.   Net1.EditAction = 1
  466.  
  467.   Net1.Org = Node(18)
  468.   Net1.Dst = Node(11)
  469.   Net1.EditAction = 1
  470.  
  471.   Net1.Org = Node(18)
  472.   Net1.Dst = Node(12)
  473.   Net1.DrawStyle = 2
  474.   Net1.EditAction = 1
  475.  
  476.   Net1.Org = Node(19)
  477.   Net1.Dst = Node(10)
  478.   Net1.DrawStyle = 2
  479.   Net1.EditAction = 1
  480.  
  481.   Net1.Org = Node(19)
  482.   Net1.Dst = Node(13)
  483.   Net1.EditAction = 1
  484.  
  485.   ' Unselect last created link
  486.   Net1.Item = 0
  487. End Sub
  488.  
  489. Private Sub Form_Activate()
  490.   ActivateForm
  491. End Sub
  492.  
  493. Private Sub Form_Deactivate()
  494.   DeactivateForm
  495. End Sub
  496.  
  497. Private Sub Form_Load()
  498.   MDI1.ShowExample(0).Enabled = False
  499.  
  500.   SpeedON Net1
  501.   banner1
  502.   SpeedOFF Net1
  503. End Sub
  504.  
  505. Private Sub Form_Resize()
  506.   If WindowState <> 1 And ScaleHeight <> 0 Then
  507.     Net1.Visible = False
  508.     Net1.Top = 0
  509.     Net1.Left = 0
  510.     Net1.Height = ScaleHeight
  511.     Net1.Width = ScaleWidth
  512.     Net1.Visible = True
  513.   End If
  514. End Sub
  515.  
  516. Private Sub Form_Unload(Cancel As Integer)
  517.   MDI1.ShowExample(0).Enabled = True
  518.   MDI1.Command5.Enabled = False
  519.   MDI1.Command5.Caption = "Comments "
  520. End Sub
  521.  
  522. Private Sub Net1_AddLink()
  523.   If interflag = True Then
  524.     Net1.Type = 2
  525.     Net1.LinkHead = 1
  526.   End If
  527. End Sub
  528.  
  529. Private Sub Net1_AddNode()
  530.   If Net1.X2 - Net1.X1 < 200 Then Net1.X2 = Net1.X1 + 200
  531.   If Net1.Y2 - Net1.Y1 < 200 Then Net1.Y2 = Net1.Y1 + 200
  532.   If interflag = True Then
  533.     Net1.Type = 2
  534.   End If
  535. End Sub
  536.  
  537. Private Sub Net1_DblClick()
  538.   If Net1.Item <> 0 Then
  539.     If Net1.IsLink = False Then
  540.       If Net1.Type = 2 Then
  541.         Dim s$
  542.         Dim pos%
  543.         s = Net1.Text
  544.         pos = InStr(s, cr)
  545.         If pos = 0 Then
  546.           Actor = s
  547.           Role = ""
  548.         Else
  549.           Actor = Left$(s, pos - 1)
  550.           Role = Mid$(s, pos + 2)
  551.         End If
  552.         frmTask.Show 1
  553.         Net1.Text = Actor & cr & lf & Role
  554.       End If
  555.     End If
  556.   End If
  557. End Sub
  558.  
  559. Private Sub Net1_KeyDown(KeyCode As Integer, Shift As Integer)
  560.   Dim l&
  561.  
  562.   Select Case KeyCode
  563.   Case KEY_DELETE
  564.     If Net1.Type = 2 Then
  565.       Net1.EditAction = 2
  566.     End If
  567.   Case KEY_LEFT
  568.     l = SendMessage(Net1.hWnd, WM_HSCROLL, SB_LINEUP, 0)
  569.   Case KEY_RIGHT
  570.     l = SendMessage(Net1.hWnd, WM_HSCROLL, SB_LINEDOWN, 0)
  571.   Case KEY_DOWN
  572.     l = SendMessage(Net1.hWnd, WM_VSCROLL, SB_LINEDOWN, 0)
  573.   Case KEY_UP
  574.     l = SendMessage(Net1.hWnd, WM_VSCROLL, SB_LINEUP, 0)
  575.   Case KEY_NEXT
  576.     l = SendMessage(Net1.hWnd, WM_VSCROLL, SB_PAGEDOWN, 0)
  577.   Case KEY_PRIOR
  578.     l = SendMessage(Net1.hWnd, WM_VSCROLL, SB_PAGEUP, 0)
  579.   End Select
  580. End Sub
  581.  
  582. Private Sub Net1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  583.   CursorShape Net1
  584. End Sub
  585.  
  586.